Skip to content

Add safeguard tests for dealing with dataclasses#41

Merged
alganet merged 1 commit into
mainfrom
test-dataclasses
Jan 5, 2026
Merged

Add safeguard tests for dealing with dataclasses#41
alganet merged 1 commit into
mainfrom
test-dataclasses

Conversation

@alganet

@alganet alganet commented Jan 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive test coverage for apywire's handling of Python dataclasses. The tests verify that the wiring system correctly instantiates dataclasses with various features including nested dataclasses, default values, __post_init__ methods, and InitVar fields.

Key Changes

  • Added test file tests/test_dataclasses.py with 10 test functions covering both runtime and compiled modes
  • Tests validate dataclass support across five scenarios: basic, nested, defaults, post-init, and InitVar
  • Each scenario is tested in both runtime (using apywire.Wiring) and compiled (using apywire.WiringCompiler) modes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_dataclasses.py Outdated
Comment thread tests/test_dataclasses.py Outdated
Comment thread tests/test_dataclasses.py Outdated
Comment thread tests/test_dataclasses.py Outdated
Comment thread tests/test_dataclasses.py Outdated
@alganet alganet marked this pull request as ready for review January 5, 2026 18:41
@alganet alganet merged commit 1b4ed8a into main Jan 5, 2026
6 checks passed
@alganet alganet deleted the test-dataclasses branch January 5, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants